import request from './request'

/**
 * 
 * @returns 
 * 菜单列表
 */
export const MenuList = () => {
    return request({
        url: '/Menu',
        method: 'get'
    })
}
/**
 * 
 * @param {*} params 
 * @returns 
 * 菜单项的添加
 */
export const MenuAdd = (params) => {
    return request({
        url: '/Menu/create',
        method: 'get',
        params
    })
}
/**
 * 
 * @param {*} params 
 * @returns 
 * 菜单项的编辑
 */
export const MenuEdit = (params, id) => {
    return request({
        url: `/Menu/${id}`,
        method: 'put',
        params
    })
}
/**
 * 
 * @param {*} params 
 * @returns 
 * 菜单项的详情查询
 */
export const MenuDetail = (id) => {
    return request({
        url: `/Menu/${id}`,
        method: 'get',
    })
}
/**
 * 
 * @returns 
 * 删除菜单项
 */
export const MenuRemove = (id) => {
    return request({
        url: `/Menu/${id}`,
        method: 'delete',
    })
}

